﻿<%@ Page Title="" Language="C#" MasterPageFile="~/YUIAspNet.Master" AutoEventWireup="true" CodeBehind="ClientSide_AutoPostback.aspx.cs" Inherits="YUIAspNetDemo.Calendar.Client" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>YUIAsp.Net Controls : LiveDemo : Calendar : AutoPostback</title>
    <style type="text/css">
        p{clear:both}
    </style>
    <script type="text/javascript">
        function OnCheckHandler(sender, args) {
            alert("checked " + args.date);
        }

        function OnUncheckHandler(sender, args) {
            alert("unchecked " + args.date);
        }
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h4>Client side & AutoPostback</h4>
    
    <p>Client side on select & deselect:</p>
    <p><yui:Calendar ID="Calendar2" OnClientSelect="OnCheckHandler" OnClientUnselect="OnUncheckHandler" runat="server" AllowMultiSelect="true" /></p>
            
    <p>Autpostback support:</p>
    <p><yui:Calendar ID="autoPostbackCalendar" AutoPostback="true" runat="server" AllowMultiSelect="true" /></p>
    
    <p><asp:Label ID="lblSelectedDates" runat="server"></asp:Label></p>
            
    <p>Autpostback support inside an UpdatePanel:</p>
    <p>
        <asp:UpdatePanel ID="updatePnl" runat="server">
            <ContentTemplate>
                <yui:Calendar ID="autoPbUP" AutoPostback="true" runat="server" AllowMultiSelect="true" />
                <p><asp:Label ID="Label1" runat="server"></asp:Label></p>
            </ContentTemplate>
        </asp:UpdatePanel>
    </p>
</asp:Content>
